﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace JVMTI_CORE_SHELL
{
    /// <summary>
    /// Interaction logic for Settings.xaml
    /// </summary>
    public partial class Settings : Window
    {
        public Settings()
        {
            InitializeComponent();
        }

        UserPreference pref;
        public Settings(UserPreference pref)
        {
            InitializeComponent();
            this.pref = pref;
            this.DataContext = pref;
        }

        private void contact_Click(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.Process.Start("https://lens.codeplex.com/");
        }

        private void apply_Click(object sender, RoutedEventArgs e)
        {
            pref.Save();
        }

        private void WindowCloseButton_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
